﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Business.ValueObject.Context;
using Business.ValueObject.SISCONVE;
using DataAccess.DNPC.Contract;
using DataAccess.DNPC;
using DataAccess.Model;

namespace DataAccess.DNPC.Core
{
    public class DAOStatusDetailVehicles : IDAOStatusDetailVehicles
    {
        private DNPCEntities DBContext { get; set; }
        private VOServiceContext RepositoryContext { get; set; }

        public DAOStatusDetailVehicles(DNPCEntities dbContext, VOServiceContext repositoryContext)
        {
            DBContext = dbContext;
            RepositoryContext = repositoryContext;
        }

        public void insert(VOStatusDetailVehicle detailVehicle)
        {
            CacheStatusDetailVehicle modelEntity = Mapper.Mapper.MapBusinessVOStatusDetailVehicleToCacheStatusDetailVehicleModelData(detailVehicle);
            DBContext.CacheStatusDetailVehicles.Add(modelEntity);
        }

        public bool member(string code)
        {
            throw new NotImplementedException();
        }

        public void delete(string code)
        {
            throw new NotImplementedException();
        }

        public VOStatusDetailVehicle find(string code)
        {
            throw new NotImplementedException();
        }


        public void DeleteAllObjects()
        {
            foreach (var item in DBContext.CacheStatusDetailVehicles)
            {
                DBContext.CacheStatusDetailVehicles.Remove(item);
            }
        }
    }
}
